package top.frsf.pattern.b_structural.a_adapter.driver;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.sql.Connection;
import java.sql.Driver;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 * MySQL数据库驱动
 *
 * @author FRSF
 * @since 2024/10/16 21:43
 */
@Data
public class MySQLDriver {

    private String url;

    private String username;

    private String password;

    public Connection mysqlConnect() throws SQLException {
        return DriverManager.getConnection(url, username, password);
    }

}
